package com.lagou.dao;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import com.lagou.pojo.Resume;

import java.util.List;

public interface ResumeDao extends MongoRepository<Resume, String> {

	/**
	 * 命名规则查询
	 */
	public Resume findByName(String name);

	/**
	 * 文档查询
	 */
	@Query("{$or:[{name:?0},{expectSalary:?1}]}")
	public List<Resume> findByNameOrExpectSalary(String name, double expectSalary);
}
